package com.sky.seata.storage.service.impl;

import com.sky.seata.storage.entity.Stock;
import com.sky.seata.storage.mapper.StockMapper;
import com.sky.seata.storage.service.IStockService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * (Stock)表服务实现类
 *
 * @author makejava
 * @since 2020-07-20 09:30:56
 */
@Service("stockService")
public class StockServiceImpl implements IStockService {
    @Resource
    private StockMapper stockMapper;

    /**
     * 新增数据
     *
     * @param stock 实例对象
     * @return 实例对象
     */
    @Override
    public Stock insert(Stock stock) {
        this.stockMapper.insert(stock);
        return stock;
    }

    @Override
    public Integer update() {
        return this.stockMapper.update();
    }
}
